.class final Lcom/adwhirl/c;
.super Ljava/lang/Object;
.source "AdWhirlLayout.java"

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field private a:Ljava/lang/ref/WeakReference;

.field private b:Ljava/lang/String;


# direct methods
.method public constructor <init>(Lcom/adwhirl/AdWhirlLayout;Ljava/lang/String;)V
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 292
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 293
    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/adwhirl/c;->a:Ljava/lang/ref/WeakReference;

    .line 294
    iput-object p2, p0, Lcom/adwhirl/c;->b:Ljava/lang/String;

    .line 295
    return-void
.end method


# virtual methods
.method public final run()V
    .locals 4

    .prologue
    .line 298
    iget-object v0, p0, Lcom/adwhirl/c;->a:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adwhirl/AdWhirlLayout;

    .line 299
    if-eqz v0, :cond_0

    .line 300
    iget-object v1, v0, Lcom/adwhirl/AdWhirlLayout;->a:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/app/Activity;

    .line 301
    if-nez v1, :cond_1

    .line 323
    :cond_0
    :goto_0
    return-void

    .line 305
    :cond_1
    new-instance v2, Lcom/adwhirl/g;

    new-instance v3, Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v3, v1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iget-object v1, p0, Lcom/adwhirl/c;->b:Ljava/lang/String;

    invoke-direct {v2, v3, v1}, Lcom/adwhirl/g;-><init>(Ljava/lang/ref/WeakReference;Ljava/lang/String;)V

    iput-object v2, v0, Lcom/adwhirl/AdWhirlLayout;->j:Lcom/adwhirl/g;

    .line 307
    invoke-static {v0}, Lcom/adwhirl/AdWhirlLayout;->a(Lcom/adwhirl/AdWhirlLayout;)Z

    move-result v1

    if-nez v1, :cond_2

    .line 308
    invoke-static {v0}, Lcom/adwhirl/AdWhirlLayout;->b(Lcom/adwhirl/AdWhirlLayout;)Z

    goto :goto_0

    .line 312
    :cond_2
    iget-object v1, v0, Lcom/adwhirl/AdWhirlLayout;->j:Lcom/adwhirl/g;

    invoke-virtual {v1}, Lcom/adwhirl/g;->e()V

    .line 313
    iget-object v1, v0, Lcom/adwhirl/AdWhirlLayout;->j:Lcom/adwhirl/g;

    invoke-virtual {v1}, Lcom/adwhirl/g;->a()Lcom/adwhirl/b/b;

    move-result-object v1

    iput-object v1, v0, Lcom/adwhirl/AdWhirlLayout;->d:Lcom/adwhirl/b/b;

    .line 315
    iget-object v1, v0, Lcom/adwhirl/AdWhirlLayout;->d:Lcom/adwhirl/b/b;

    if-nez v1, :cond_3

    .line 316
    iget-object v0, v0, Lcom/adwhirl/AdWhirlLayout;->c:Ljava/util/concurrent/ScheduledExecutorService;

    const-wide/16 v1, 0x1e

    sget-object v3, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-interface {v0, p0, v1, v2, v3}, Ljava/util/concurrent/ScheduledExecutorService;->schedule(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;

    goto :goto_0

    .line 321
    :cond_3
    invoke-static {v0}, Lcom/adwhirl/AdWhirlLayout;->c(Lcom/adwhirl/AdWhirlLayout;)V

    goto :goto_0
.end method
